package service;

import entity.Student;
import mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService implements StudentMapper {
    @Autowired
    StudentMapper sm;



    @Override
    public int insert(Student student) {
        System.out.println(student);
        return sm.insert(student);
    }

    @Override
    public int insertList(List<Student> list) {
        return sm.insertList(list);
    }

    @Override
    public Student selectByPrimaryKey(Integer id) {
        return sm.selectByPrimaryKey(id);
    }

    @Override
    public int updateStudentByPrimaryKey(Student student) {
        return sm.updateStudentByPrimaryKey(student);
    }

    @Override
    public Student selectByNameAndAge(String name, Integer age) {
        return sm.selectByNameAndAge(name,age);
    }
}
